package com.lc202406;

public class Solution392 {
    public boolean isSubsequence(String s, String t) {
        if (s.equals("")) {
            return true;
        }
        int start = 0;
        for (int i = 0; i < s.length() && start < t.length(); ) {
            if (s.charAt(i) == t.charAt(start)) {
                i++;
            }
            start++;
            if (i == s.length()) {
                return true;
            }
        }
        return false;
    }
}
